<div class="col-md-12">
	<form method="post" class="form-horizontal" action="${cxt!}/wealthcollegetheme/editTheme" id="wctheme">
		<input type="hidden" name="wealthCollegeTheme.id" value="${updateTheme.id!}" />
		<div class="form-group">
			<div class="col-md-6">
				<label class="col-md-3 control-label">${_res["wealth.college.theme.cover"]}:<span class="fontColorRed">&nbsp;*</span></label>
			</div>
		</div>
		<div class="form-group">
			<div class="col-md-1"></div>
			<div class="col-md-2">
				<div class="col-md-3 proimgfiles">
					<a href="javascript:void(0)" class="filesIconAdd" id="uploadproimgfiles">
						<!-- //ajax片段开始 -->
						<%  #ajax uploadproimgfiles: {%>
							<% if (isEmpty(uploadFiles)) { %>
								<img src="${imgCxt!}/${updateTheme.coverpictureurl!}" width="100%" height="100%" style="position: relative; z-index: 99999;">
							<% } else { %>
								<input type="hidden" name="wealthCollegeTheme.coverpictureurl" value="${uploadFiles.path!}" />
								<img src="${imgCxt!}/${uploadFiles.path!}" width="100%" height="100%" style="position: relative; z-index: 99999;">
							<% } %>
						<% } %>
						<!-- //ajax片段结尾 -->
					</a> 
					<input type="file" style="opacity: 0" id="fileuploadproimgfiles" name="coverpictureurl" />
				</div>
			</div>
		</div>
		<div class="form-group">
			<div class="col-md-3">
				<label class="col-md-6 control-label">${_res["wealth.college.theme.name"]}:<span class="fontColorRed">&nbsp;*</span></label>
			</div>
			<div class="col-md-3">
				<input type="text" class="form-control" name="wealthCollegeTheme.themename" required aria-required="true" value="${updateTheme.themename!}" />
			</div>
		</div>
		<div class="form-group">
			<div class="col-md-3">
				<label class="col-md-6 control-label">${_res["wealth.college.theme.url"]}:<span class="fontColorRed">&nbsp;*</span></label>
			</div>
			<div class="col-md-3">
				<input type="text" class="form-control" name="wealthCollegeTheme.url" required aria-required="true" value="${updateTheme.url!}" />
			</div>
		</div>
		<div class="form-group">
			<div class="col-md-3">
				<label class="col-md-6 control-label">${_res["wealth.college.theme.introduction"]}:<span class="fontColorRed">&nbsp;*</span></label>
			</div>
			<div class="col-md-3">
				<textarea style="width: 140%" name="wealthCollegeTheme.themeintorduction">${updateTheme.themeintorduction!}</textarea>
			</div>
		</div>
		<div class="form-group">
			<div class="col-md-3">
				<label class="col-md-6 control-label">${_res["wealth.college.usergroup"]}:<span class="fontColorRed">&nbsp;*</span></label>
			</div>
			<div class="col-md-3">
				<#dict type="select" multiple="multiple" name="wealthCollegeTheme.usergroup" value="${updateTheme.usergroup!}"
					table="customer_role" filedName="name" filedValue="code" defaultValue="${paramMap['project.f_status']}" />
			</div>
		</div>
		
		<div class="form-group">
			<div class="col-md-6">
				<label class="col-md-12 control-label ">  
					<% if(hasPrivilegeUrl("getWcthemeList")){ %>
						<button type="button" class="btn btn-warning" onClick="ajaxContent('/wealthcollegetheme/getWcthemeList');">
							${_res["system.return"]}
						</button>
					<% } %> 
					
					<% if(hasPrivilegeUrl("editTheme")){ %>
						<button type="submit" class="btn btn-primary">
							${_res["system.submit"]}
						</button> 
					<% } %>
				</label>
			</div>
		</div>
	</form>
</div>
<#submit formId="wctheme" divId="content" />

<script>
	$(document).ready(function() {
		$("a[id^='upload']").on('click', function() {
			var id = $(this).attr("id");
			$("#file" + id).click();
		});
		// 选择文件之后执行上传ajaxFileUpload2(divId,fileElementId,toUrl,uploadType,uploadFiles,callback)
		$("input[id^='fileupload']").on("change", function() {
			var fileElementId = $(this).attr("id");
			ajaxFileUpload2("uploadproimgfiles",fileElementId,"/realty/wealthcollege/edittheme.html#uploadproimgfiles","theme","uploadFiles");
		});
	});
</script>